/**
 * Author(s): xuming.Wong <xuming.Wong@gmail.com>
 */

#include "EntityObject.h"
#include "SceneObject.h"

namespace PQEngine
{
	EntityObject::EntityObject(SceneObject* sceneObject,Ogre::String meshName)
		: GameObject(sceneObject,GAME_OBJECT_ENTITY)
	{
		assert(sceneObject);

		Ogre::Entity* entity=sceneObject->getSceneManager()->createEntity(meshName);
		
		_entityComponent=new EntityComponent(entity);
		_entityComponent->attach(this);

	}
	
}
